#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define INT int*
typedef int* int_ptr;






int* printNumbers(int n, int* returnSize) {
	// write code here
	int max = 0;
	int z = 0;

	for (int i = 9,i2=1; i2 <= n; i *= 10,i2++)
	{
		max += 9;

	}
	returnSize = (int*)malloc(max * sizeof(int));
	for (int j = 1; j <= max; j++)
	{
		returnSize[z] = j;
		z++;
	}
	return returnSize;

}
int main()
{
	char c2[] = { '\x10','\xa','\8' };
	//char c1[] = { '1','2','3','4','5' };
	//int y[5 + 3] = { 0,1,3,5,7,9 };
	////printf("%d\n", strlen(y));
	//int a = 10,b=20,c=30,d=40;
	//INT ptr1 = &a,ptr2=&b;
	//int_ptr p1 = &c,p2=&d;
	//printf("%d\n", *p1);
	//printf("%d\n", strlen(c2));
	//printf("%d\n", strlen(c1));
	int* returnSize = NULL;
	int n = 0;
	scanf("%d", &n);
	int * ptr=printNumbers(n, returnSize);
	for (int i = 0; i < 9; i++)
	{
		printf("%d", ptr[i]);

	}

	
	return 0;
}